/*
 * MMATimeSeries.java
 *
 * Created on November 16, 2004, 7:48 PM
 */

package edu.temple.GUS.MMA.DataTypes;

/**
 *
 * @author  jeffleon
 */
public class MMATimeSeries {
    
    // Time series attributes
    private int t;
    private float xLL;
    private float yLL;
    private float tStart;
    private int tResolution;
    private float noData;   // No data value
    private float data[];
    
    /** Creates a new instance of MMATimeSeries */
    public MMATimeSeries() {
    }

    public MMATimeSeries(int t)
    {
        this.t = t;
    }
    
    public MMATimeSeries(int t, float tStart)
    {
        this.t = t;
        this.tStart = tStart;
    }

    public MMATimeSeries(int t, int tResolution)
    {
        this.t = t;
        this.tResolution = tResolution;
    }

    public MMATimeSeries(int t, int tResolution, float tStart)
    {
        this.t = t;
        this.tResolution = tResolution;
        this.tStart = tStart;
    }

    // Member variable access functions
    public int getT() { return t; }
    public void putT(int t) { this.t = t; }

    public float getTStart() { return tStart; }
    public void putTStart(float tStart) { this.tStart = tStart; }

    public int getTResolution() { return tResolution; }
    public void putTResolution(int tResolution) { this.tResolution = tResolution; }

    //Retrieve an element value of a grid
    //where x and y represent the indexes
    public float getElement(int t) {
        if (data != null)
            return data[t];
        else
            return 0.0f;
    }

    public float[] getData() { return data; }
    public void putData(float inputData[]) { data = inputData; }
    
    public void putXLL(float xLL) { this.xLL = xLL; }
    public void putYLL(float yLL) { this.yLL = yLL; }

    public float getXLL() { return xLL; }
    public float getYLL() { return yLL; }
    
    public float getNoData() { return noData; }
    public void putNoData(float noData) { this.noData = noData; }

}
